/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.palomino.servicios;

/**
 *
 * @author JONATHAN
 */
import java.io.Serializable;

public class UsuariosSAPTronBD
        implements Serializable {

    private Object[] asDatos = null;
    private String sUsuario = "";
    private String sPerfiles = "";
    private String sSistemaOperativo = "";
    private String sForzarUsuario = "N";
    private String sCambiarUsuario = "N";
    private String sHeredarUsuario = "N";
    private String sAccesoSinClave = "N";
    private String sClaveSAP = "";
    private String sClaveBDFija = "";
    private String sUsuarioBDFijo = "";
    private String sCadenaBD = "";
    private int iDiasModClave = 0;
    private int iDiasCaducidad = 0;
    private String sObligarClaveDistinta = "N";
    private String sObligarNumerosLetras = "N";
    private int iMinimaLonClave = 0;
    private int iMaximaLonClave = 30;

    public static String nvl(String paramString) {
        if (paramString == null) {
            return new String("");
        }
        if (paramString.trim().toLowerCase().equals("null")) {
            return new String("");
        }
        return paramString.trim();
    }

    public UsuariosSAPTronBD(Object[] paramArrayOfObject) {
        for (int i = 0; i < paramArrayOfObject.length; i++) {
            paramArrayOfObject[i] = nvl((String) paramArrayOfObject[i]);
        }
        this.asDatos = paramArrayOfObject;
        this.sUsuario = nvl((String) paramArrayOfObject[0]);
        this.sPerfiles = nvl((String) paramArrayOfObject[1]);
        this.sSistemaOperativo = nvl((String) paramArrayOfObject[2]);
        this.sForzarUsuario = nvl((String) paramArrayOfObject[3]);
        this.sCambiarUsuario = nvl((String) paramArrayOfObject[4]);
        this.sHeredarUsuario = nvl((String) paramArrayOfObject[5]);
        this.sAccesoSinClave = nvl((String) paramArrayOfObject[6]);
        this.sClaveSAP = nvl((String) paramArrayOfObject[7]);
        this.sClaveBDFija = nvl((String) paramArrayOfObject[8]);
        this.sUsuarioBDFijo = nvl((String) paramArrayOfObject[9]);
        this.sCadenaBD = nvl((String) paramArrayOfObject[10]);
        try {
            this.iDiasModClave = Integer.parseInt((String) paramArrayOfObject[11]);
        } catch (NumberFormatException localNumberFormatException1) {
        }
        try {
            this.iDiasCaducidad = Integer.parseInt((String) paramArrayOfObject[12]);
        } catch (NumberFormatException localNumberFormatException2) {
        }
        this.sObligarClaveDistinta = nvl((String) paramArrayOfObject[13]);
        this.sObligarNumerosLetras = nvl((String) paramArrayOfObject[14]);
        try {
            this.iMinimaLonClave = Integer.parseInt((String) paramArrayOfObject[15]);
        } catch (NumberFormatException localNumberFormatException3) {
        }
        try {
            this.iMaximaLonClave = Integer.parseInt((String) paramArrayOfObject[16]);
        } catch (NumberFormatException localNumberFormatException4) {
        }
    }

    public Object[] getDatos() {
        return this.asDatos;
    }

    public String getUsuarioBDFijo() {
        return this.sUsuarioBDFijo;
    }

    public String getClaveBDFija() {
        return this.sClaveBDFija;
    }

    public String getCadenaBD() {
        return this.sCadenaBD;
    }

    public String getClaveSAP() {
        return this.sClaveSAP;
    }

    public void setClaveSAP(String paramString) {
        this.asDatos[7] = paramString;
        this.sClaveSAP = paramString;
    }

    public String getPerfiles() {
        return this.sPerfiles;
    }

    public int getDiasModClave() {
        return this.iDiasModClave;
    }

    public int getDiasCaducidad() {
        return this.iDiasCaducidad;
    }

    public boolean isAccesoSinClave() {
        return this.sAccesoSinClave.equals("S");
    }

    public boolean isObligarClaveDistinta() {
        return this.sObligarClaveDistinta.equals("S");
    }

    public boolean isForzarUsuario() {
        return this.sForzarUsuario.equals("S");
    }

    public boolean isHeredarUsuario() {
        return this.sHeredarUsuario.equals("S");
    }

    public boolean isCambiarUsuario() {
        return this.sCambiarUsuario.equals("S");
    }

    public boolean isObligarNumerosLetras() {
        return this.sObligarNumerosLetras.equals("S");
    }

    public int getMinimaLonClave() {
        return this.iMinimaLonClave;
    }

    public int getMaximaLonClave() {
        return this.iMaximaLonClave;
    }
}